#ifndef APPLICATION_H
#define APPLICATION_H

#include <QtCore/QCoreApplication>
#include <QtCore/QTimer>
#include <QtCore/QStringList>
#include <QtCore/QMutex>
#include <QtNetwork/QNetworkAccessManager>
#include <QtNetwork/QNetworkReply>
#include <LogiLcd.h>

#define LOGI_LCD_MONO_MAX_LINE  (0x00000003)
#define LOGI_LCD_COLOR_MAX_LINE (0x00000006)

class LcdWatchdogApplication : public QCoreApplication
{
	Q_OBJECT

public:
	LcdWatchdogApplication(int argc, char *argv[]);
	~LcdWatchdogApplication();
	void shutdown();
	int exitCode;

private:
	LogiLcd *lcd;
	QTimer *timer;
	int firstLine;
	int firstLineColor;
	QNetworkAccessManager* nam;
	QStringList serveurNames;
	QStringList serveurs;
	QString serveurImage;
	QStringList infos;
	bool useServeurImage;
	QMutex mutex;

	private slots:
		void buttonPressed(int button);
		void timeout();
		void finishedSlot(QNetworkReply* reply);
};

#endif // APPLICATION_H
